<html>
<head>
<script src="../resources/js-test.js"></script>
<script>
var jsTestIsAsync = true;
var msg;

function setPlugin()
{
  var pluginDiv = document.querySelector("#pluginDiv");
  pluginDiv.style.display = 'inline';
  pluginDiv.innerHTML = '<object id="plugin" width="300" height="300" type="application/x-blink-test-plugin"/>';
  document.querySelector('object').addEventListener('message', function (message)
  {
    msg = message;
    shouldBeEqualToString('msg.data', 'loaded');
    finishJSTest();
  });
}
</script>
</head>
<body onload="setPlugin()">
<div id="pluginDiv" style="display: none;"></div>
</body>
</html>
